﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace blackhouse.BlackApart.Data.Sql {
    public class SqlDataFactory : IDataFactory {

        #region Fields

        private string connectionString;

        #endregion

        #region Constructors

        public SqlDataFactory(string sqlConnectionString) {
            this.connectionString = sqlConnectionString;
        }

        #endregion

        public INewsletterDataAccess GetNewsletterDataAccess() {
            return new NewsletterDataAccess(this.connectionString);
        }

        public IPlaceDataAccess GetPlaceData() {
            return new PlaceDataAccess(this.connectionString);
        }

        public IPushMailDataAccess GetPushMailData() {
            return new ActionDataAccess(this.connectionString);
        }

        public IApartmentGroupDataAccess GetApartmentDataGroup() {
            return new ApartmentGroupDataAccess(this.connectionString);
        }

        public IApartmentDataAccess GetApartmentData() {
            return new ApartmentDataAccess(this.connectionString);
        }

        public IApartmentLocationDataAccess GetApartmentLocationData() {
            return new ApartmentLocationDataAccess(this.connectionString);
        }

        public IReservationDataAccess GetReservationData() {
            return new ReservationDataAccess(this.connectionString);
        }

        public IPricesDataAccess GetPricesData() {
            return new PricesDataAccess(this.connectionString);
        }

        public IFurnitureDataAccess GetFurnitureData() {
            return new FurnitureDataAccess(this.connectionString);
        }

        public IOpinionsDataAccess GetOpinionsData() {
            return new OpinionsDataAccess(this.connectionString);
        }

        public IMailTemplateDataAccess GetMailTemplateData() {
            return new MailTemplateDataAccess(this.connectionString);
        }

        public IActionDataAccess GetActionData() {
            return new ActionDataAccess(this.connectionString);
        }

        public IAdditionalServiceDataAccess GetAdditionalServicesData() {
            return new AdditionalServicesDataAccess(this.connectionString);
        }

        public ReservationServiceSaveTransaction GetReservationServiceSaveTransaction() {
            throw new NotImplementedException();
        }
    }
}
